package de.windeln.marketing.campaign.dao.interfaces;

import java.util.List;
import java.util.Map;

import de.windeln.marketing.campaign.costinterval.model.CostintervalClientObject;
import de.windeln.marketing.campaign.model.RequestClientObject;

public interface CampaignMapper {

	List<Map<String, Object>> fetchCampaigns();

	List<Map<String, Object>> fetchPromocodes();

	List<Map<String, Object>> fetchAllCampaignsAndPromocodes();

	void insertNewCampaign(RequestClientObject campaign);

	void updateCampaign(RequestClientObject campaignToUpdate);
	
	void insertNewPromocode(RequestClientObject campaign);

	void updatePromocode(RequestClientObject campaign);

	Map<String, Object> fetchCampaignAndPromocodeByCampaignId(Long id);

	Map<String, Object> fetchCampaignAndPromocodeByPromocodeId(Long promocodeId);
	
	void updateCampaignToDeleteState(long id);
	
	void updatePromocodeToDeleteStateByCampaignId(long id);

	void updateCampaignAfterInsertingCostInterval(CostintervalClientObject costInterval);

	void updateCampaignAfterDeletingCostInterval(Long costintervalId);

	String findAlreadyExistingCampaign(RequestClientObject rco);
}
